<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>潮玩注册</title>
    <style>
        body {
            margin: 0;
            font-family: "Arial Black", sans-serif;
            background: linear-gradient(135deg, #f8f1f4, #f5e8ee);
            color: #333;
        }
        .register-box {
            width: 400px;
            margin: 80px auto;
            background-color: rgba(255, 255, 255, 0.75);
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 0 20px #ff6b9d;
        }
        h2 {
            text-align: center;
            color: #ff6b9d;
            margin-bottom: 30px;
            text-shadow: 1px 1px 5px #fff;
        }
        input[type=text], input[type=password], input[type=email] {
            width: 100%;
            padding: 12px;
            margin: 10px 0 20px;
            border: none;
            border-radius: 8px;
            background-color: #fff5f8;
            color: #333;
        }
        input[type=submit] {
            width: 100%;
            padding: 12px;
            background: #ff6b9d;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: 0.3s;
        }
        input[type=submit]:hover {
            background: #f04a8d;
        }
        .link {
            text-align: center;
            margin-top: 15px;
        }
        .link a {
            color: #ffb3d3;
            text-decoration: none;
        }
        .error {
            color: #ff9bb3;
            text-align: center;
            margin-bottom: 15px;
        }
    </style>
</head>
<body>
<div class="register-box">
    <h2>潮玩用户注册</h2>

    <c:if test="${not empty errorMsg}">
        <div class="error">${errorMsg}</div>
    </c:if>

    <form action="${pageContext.request.contextPath}/user/register" method="post">
        <input type="text" name="uname" placeholder="用户名" required/>
        <input type="password" name="pwd" placeholder="密码" required/>
        <input type="email" name="email" placeholder="邮箱" required/>
        <input type="submit" value="注册">
    </form>

    <div class="link">
        已有账号？ <a href="${pageContext.request.contextPath}/user/login">去登录</a>
    </div>
</div>
</body>
</html>